import homeRouter from "./home"
import remainingRouter from "./remaining"

import {
    ascending,
    formatTwoStageRoutes,
    formatFlatteningRoutes
} from "../utils"
// 原始静态路由（未做任何处理）
const routes = [
    homeRouter
]

// 导出处理后的静态路由（三级及以上的路由全部拍成二级）
export const constantRoutes = formatTwoStageRoutes(
    formatFlatteningRoutes(ascending(routes))
);

// 用于渲染菜单，保持原始层级
export const constantMenus = ascending(routes).concat(
    ...remainingRouter
);
